package com.cloud.mall.pms.service;

import com.cloud.mall.api.CommonPage;
import com.cloud.mall.base.BaseResponse;
import com.cloud.mall.pms.dto.home.HomeContentResult;
import com.cloud.mall.pms.out.PmsProductCategoryOut;
import com.cloud.mall.pms.out.PmsProductOut;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Api(tags = "首页内容管理")
@RequestMapping("/home")
public interface HomeService {

    @ApiOperation(value = "首页内容页信息展示")
    @GetMapping("/content")
    BaseResponse<HomeContentResult> content();

    @ApiOperation("分页获取推荐商品")
    @GetMapping("/recommendProductList")
    BaseResponse <CommonPage<PmsProductOut>> recommendProductList(@RequestParam(value = "pageSize", defaultValue = "4") Integer pageSize,
                                                                                   @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum);

    @ApiOperation("获取首页商品分类")
    @GetMapping("/productCateList/{parentId}")
    BaseResponse <List<PmsProductCategoryOut>> getProductCateList(@PathVariable Long parentId);


}
